package com.xuecheng.api.comment;

import com.xuecheng.api.comment.model.dto.CommentDTO;
import com.xuecheng.api.comment.model.qo.CommentConditionModel;
import com.xuecheng.api.comment.model.vo.CommentStatisticsVo;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import com.xuecheng.common.domain.response.RestResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Api("评论列表,存储评论信息")
public interface CommentAPI {

    @ApiOperation(value = "查询评论列表")
    public RestResponse<PageVO<CommentDTO>> list(PageRequestParams params, CommentConditionModel commentModel, Boolean company);

    @ApiOperation(value = "添加评论")
    public RestResponse<CommentDTO> comment(CommentDTO commentDTO);

    @ApiOperation(value = "评论点赞")
    public RestResponse<CommentDTO> praise(Long commentId);

    @ApiOperation(value = "删除评论")
    public RestResponse<CommentDTO> delComment(Long commentId);

    @ApiOperation(value = "批量删除评论")
    RestResponse<Boolean> batchDelComment(List<Long> commentIds);

    @ApiOperation("统计-评论数,平均分")
    RestResponse<CommentStatisticsVo> getStatistics(@PathVariable Long coursePubId);

    @ApiOperation("根据id获得评论--远程调用")
    RestResponse<CommentDTO> getCommentById(Long commentId);

}
